package user_router

import (
	user_controller "gvb_service/controller/user"
	auth_middleware "gvb_service/middleware/auth"

	"github.com/gin-gonic/gin"
)

func UserRouterInit(r *gin.Engine) {
	userRouter := r.Group("/api/user")
	userRouter.Use(auth_middleware.AuthMiddleware)
	{
		userRouter.POST("/add", user_controller.Adduser)
		userRouter.POST("/list", user_controller.GetUserList)
		userRouter.POST("/getUserById", user_controller.GetUserById)
		userRouter.POST("/deleteUserById", user_controller.DeleteUserById)
		userRouter.POST("/logout", user_controller.Logout)
	}
}
